package com.linkoog.devtools.websocket.action;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
import com.linkoog.devtools.websocket.toolwindow.WebscoketToolWindowManager;
import org.jetbrains.annotations.NotNull;

public class ShowWebsocketToolWindowAction extends AnAction {

    @Override
    public void actionPerformed(@NotNull AnActionEvent e) {
        final Project project = e.getProject();
        if (project == null) return;

        WebscoketToolWindowManager.getInstance(project).show();
    }

    @Override
    public @NotNull ActionUpdateThread getActionUpdateThread() {
        return ActionUpdateThread.EDT;
    }

}
